<!--
 * @Descripttion: 
 * @version: 
 * @Author: 十三
 * @Date: 2022-03-09 21:05:03
 * @LastEditors: 十三
 * @LastEditTime: 2022-03-09 21:50:34
-->
<template>
  <div class="nav">
    <el-menu :default-active="this.$route.path+'/base'" class="el-menu-demo" router mode="horizontal" @select="handleSelect">
      <el-menu-item v-for="(item, index) in navlist" :key="index" :index="item.navPath">
        {{item.navName}}
      </el-menu-item>
    </el-menu>
  </div>
</template>
<script>
export default {
  data() {
    return {
     navlist:[
       {
         navName:'基础信息',
         navPath:'/physical_exam/res/base'
       },
       {
         navName:'生化检查',
         navPath:'/physical_exam/res/bloodcheck'
       },
       {
         navName:'免疫检查',
         navPath:'/physical_exam/res/immunoassay'
       },
       {
         navName:'B超',
         navPath:'/physical_exam/res/ultrasound'
       },
       {
        navName:'X射线检查',
        navPath:'/physical_exam/res/xray'
       },
       {
         navName:'心电图检查',
         navPath:'/physical_exam/res/ecg'
       }
     ]
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>
<style lang="less" scoped>
.nav{
  display: flex;
  justify-content:center;
  width:calc(98% - 200px);
}
</style>
